#pragma once

#include <time.h>

class ActionTimer
{
public:
	int m_Soon; //For throttle
	int m_Now;  //For storing current time
	int m_Then; //For storing previous time
	int m_Passed; //For storing number of miliseconds between now and then
	int m_TotalTime;//For storing how long the game has been going

	int m_AccumulatedTime; //For keeping track of passed time

	ActionTimer():m_Soon(0), m_Now(0), m_Then(clock()), m_Passed(0), m_AccumulatedTime(0), m_TotalTime(0){}
	~ActionTimer(){}

	void LogTime(void);
	bool IsTime(int a_Time);
	inline void ResetTime(void) { m_AccumulatedTime = 0; }
	bool Throttle(void);
	inline int GetSoon(void) {return m_Soon;}
};